<!DOCTYPE html>
<html>
<head>
    <title>系统配置</title>
	 <#include "/common/import.ftl" >
    <script type="text/javascript" src="${ctx}/js/utiltools.js"></script>
    <script type="text/javascript" src="${ctx}/js/easyui/extendvalidate.js"></script>
    <script type="text/javascript">
        var inputForm = '#inputForm';
        $(function () {

            $(inputForm).form({
                success: function (data) {
                    var result = jQuery.parseJSON(data);
                    if (result.flag == 'T') {
                        $.messager.confirm('提交结果', '操作成功', function () {
                            parent.colseAdd();// 关闭添加窗口
                            parent.cateReload();// 刷新列表
                        });
                    } else if (result.flag == 'F') {
                        $.messager.alert('提交结果', result.msg, 'info');
                    } else {
                        $.messager.alert('提交结果', '操作失败', 'error');
                    }
                },
                error: function (messg) {
                    $.messager.alert('错误提示', messg.responseText, 'error');
                }
            });
            $('#beanId').focus();
        });

        function doSubmit() {
            var flag = $(inputForm).form('validate');
            if (flag) {
                $(inputForm).submit();
            }
        }
    </script>
</head>
<body>
<div id="tip"></div>
<form id="inputForm" name="inputForm" method="post" action="${ctx}/config/save.action">
    <input type="hidden" name="formToken" id="formToken" value="${formToken!''}"/>
    <input type="hidden" name="isAdd" id="isAdd" value="${isAdd!''}"/>
<#if item.fileName??>
     <input type="hidden" name="fileName" value="${item.fileName!''}"/>
</#if>
    <table class="datagrid-body">
        <tr>
            <td class="datagrid-header">文件名称</td>
            <td>
                <input type="text" <#if item.fileName??><#else> name="fileName"</#if>
                        id="fileName2"/>
                <!--
                <select type="text" class="easyui-combobox" <#if item.fileName??><#else> name="fileName"</#if>
                        id="fileName2">
                    <option value="">--请选择--</option>
                    <option value="unity_config.properties">统一配置文件</option>
                    <option value="uct_client.properties">UCT客户端配置文件</option>
                    <option value="custom-method.properties">实体对象IUS配置文件</option>
                    <option value="white.xml">默认白名单配置文件</option>
                    <option value="sso_white.xml">sso白名单配置文件</option>
                    <option value="uct_white.xml">uct白名单配置文件</option>
                    <option value="portal_white.xml">portal白名单配置文件</option>
                    <option value="flow_white.xml">flow白名单配置文件</option>
                </select>*-->
            </td>
        </tr>
        <tr>
            <td class="datagrid-header">内&nbsp;&nbsp;&nbsp;&nbsp;容<font color=red>*</font></td>
            <td>
                <textarea name="confingText" cols="120" rows="15">${item.confingText!""}</textarea>
            </td>
        </tr>
        <tr>
            <td class="datagrid-header"></td>
            <td>
                <a href="#" class="easyui-linkbutton" id="bt1" iconCls="icon-save"
                   onclick="doSubmit();">提交</a>
                <a href="#" class="easyui-linkbutton" iconCls="icon-cancel"
                   onclick="parent.colseAdd();" ;>取消</a>
            </td>
        </tr>
    </table>
</form>
<script>
    $("#fileName2").val("${item.fileName!''}");
    <!--UtilTools.initSelect("fileName2", "${item.fileName!''}");-->
    <#if item.fileName??>
       $('#fileName2').attr("disabled", "disabled");
    </#if>
</script>

</body>
</html>
